import server from '../../server/api'
import { Indicator } from 'mint-ui';
// 请求订单列表接口
const getOrderList = ({commit,state}, {memberId}) => {
	Indicator.open({
		text: '加载中...',
		spinnerType: 'fading-circle'
	});
	server.post("/index/order/order_list", {
		member_id: memberId
	}, function(res) {
		if(res.error == 0){
			Indicator.close();
		}
		commit("setOrderList",res.data)
	})
}
// 请求订单详情接口
const getOrderDetail = ({commit,state}, params) => {
	server.post("/index/order/order_info", params, function(res) {
		commit("setOrderDetail",res.data)

	})
}
const getOrderDetailOther = ({commit,state}, params) => {
	server.post("/index/order/order_info2", params, function(res) {
		console.log(res.data)
		commit("setOrderDetail",res.data)

	})
}
const loopEvent = () => {
	
}
export default {
	getOrderList,
	getOrderDetail,
	getOrderDetailOther
}